package org.colcon.web.model;

import java.util.HashMap;
import java.util.Map;

import org.colcon.web.model.framework.IAgent;

public class Agent extends Container implements IAgent 
{
	public String getType(){return "agent";}
	
	private static final long serialVersionUID = 1062498450616735169L;
	
	protected static final String
	
		// containers
		COMMANDS = "commands";
	
	public Agent()
	{
		this(new HashMap<String, String>());
	}
	
	public Agent(Map<String, String> args)
	{
		this(args.get(PARENT), args.get(ID), args.get(CHILDREN));
	}
	
	public Agent(String parent, String id, String children)
	{
		super(parent, id, children);
	}
	
	public String commands()
	{
		return getPath() + '/' + "commands";
	}
	
	public String getCommandPath(String id)
	{
		return commands() + '/' + id;
	}
}
